//
//  CLKeyboardHelper.h
//  CLBrowser
//
//  Created by 梁慧聪 on 21/7/29.
//  Copyright © 2021年 梁慧聪. All rights reserved.
//

#import <Foundation/Foundation.h>

@class CLKeyboardHelper,CLKeyboardState;

@protocol CLKeyboardHelperDelegate <NSObject>

@optional
- (void)keyboardHelper:(CLKeyboardHelper *)keyboardHelper keyboardWillShowWithState:(CLKeyboardState *)state;
- (void)keyboardHelper:(CLKeyboardHelper *)keyboardHelper keyboardDidShowWithState:(CLKeyboardState *)state;
- (void)keyboardHelper:(CLKeyboardHelper *)keyboardHelper keyboardWillHideWithState:(CLKeyboardState *)state;

@end

@interface CLKeyboardState : NSObject

@property (nonatomic, assign) double animationDuration;
@property (nonatomic, assign) UIViewAnimationCurve animationCurve;
@property (nonatomic, copy) NSDictionary *userInfo;

- (CGFloat)intersectionHeightForView:(UIView *)view;

@end

@interface CLKeyboardHelper : NSObject

SYNTHESIZE_SINGLETON_FOR_CLASS_HEADER(CLKeyboardHelper)
- (void)startObserving;
- (void)addDelegate:(id<CLKeyboardHelperDelegate>)delegate;
- (void)removeDelegate:(id<CLKeyboardHelperDelegate>)delegate;

@end
